﻿#region Header

/*
Remote views based on linq
By

Pascal Hauser 
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

and

Raphael Gfeller
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

*/

#endregion

#region Usings

using System;

#endregion

namespace InterLinq.Test {
	/// <summary>
	/// represents a order position within a <see cref="Order"/>
	/// </summary>
	[Serializable]
	public class OrderPosition : IOrderPosition {
		#region Public Properties

		/// <summary>
		/// Gets the product of this order position
		/// </summary>
		public IProduct Product { get; set; }

		/// <summary>
		/// gets the how many article of the <see cref="Product"/> are sold
		/// </summary>
		public int Count { get; set; }

		/// <summary>
		/// Gets or sets the id of the order position
		/// </summary>
		public Guid Id { get; set; }

		#endregion

		#region Public Methods

		/// <summary>
		/// ctr
		/// </summary>
		/// <param name="count">how many of the given product is sold</param>
		/// <param name="product">the product</param>
		public OrderPosition(int count, IProduct product) {
			Product = product;
			Count = count;
			Id = Guid.NewGuid();
		}

		#endregion

		#region Private Methods

		// private methods located here

		#endregion

		#region Private Fields

		// private fields located here

		#endregion
	}
}